<?

include ('../../config/config.php');
$q = mysql_query("SELECT t.NAMA_TEAM as Nama, t.ID_TEAM as id, COUNT(k.ID_PEKERJAAN) as jumlah FROM team as t INNER JOIN biodata as b ON t.ID_TEAM=b.ID_TEAM INNER JOIN pekerjaan as k ON b.NIP=k.NIP WHERE b.ID_DEPARTEMEN = '" . $_SESSION['ID_DEPARTEMEN'] ."' GROUP BY t.NAMA_TEAM");
$qn = mysql_query("SELECT t.NAMA_TEAM as Nama, t.ID_TEAM as id, COUNT(k.ID_PEKERJAAN) as jumlah FROM team as t INNER JOIN biodata as b ON t.ID_TEAM=b.ID_TEAM INNER JOIN pekerjaan as k ON b.NIP=k.NIP WHERE b.ID_DEPARTEMEN = '" . $_SESSION['ID_DEPARTEMEN'] ."' GROUP BY t.NAMA_TEAM");
$qr = mysql_query("SELECT t.NAMA_TEAM as Nama, t.ID_TEAM as id, COUNT(k.ID_PEKERJAAN) as jumlah FROM team as t INNER JOIN biodata as b ON t.ID_TEAM=b.ID_TEAM INNER JOIN pekerjaan as k ON b.NIP=k.NIP WHERE k.ID_STATUS_PEKERJAAN = 2 AND b.ID_DEPARTEMEN ='".$_SESSION['ID_DEPARTEMEN']."' GROUP BY t.NAMA_TEAM");
$qd = mysql_query("SELECT t.NAMA_TEAM as Nama, t.ID_TEAM as id, COUNT(k.ID_PEKERJAAN) as jumlah FROM team as t INNER JOIN biodata as b ON t.ID_TEAM=b.ID_TEAM INNER JOIN pekerjaan as k ON b.NIP=k.NIP WHERE k.ID_STATUS_PEKERJAAN = 3 AND b.ID_DEPARTEMEN ='".$_SESSION['ID_DEPARTEMEN']."' GROUP BY t.NAMA_TEAM");
$qp = mysql_query("SELECT t.NAMA_TEAM as Nama, t.ID_TEAM as id, COUNT(k.ID_PEKERJAAN) as jumlah FROM team as t INNER JOIN biodata as b ON t.ID_TEAM=b.ID_TEAM INNER JOIN pekerjaan as k ON b.NIP=k.NIP WHERE k.ID_STATUS_PEKERJAAN = 1 AND b.ID_DEPARTEMEN ='".$_SESSION['ID_DEPARTEMEN']."' GROUP BY t.NAMA_TEAM");
?>